package Demo_2;

public class Thread_name {
    public static void main(String[] args) {
        Thread thread4 = new Thread(() ->{
            while (true) {
                System.out.println("我有名字：" + Thread.currentThread().getName());
            }
        },"Thread");
        thread4.start();

    }
}
